﻿// --------------------------------------------------------------------------------------------------------------------
// <copyright file="QueryCondition.cs" company="CodePlex">
//   Copyright © CodePlex 2012
// </copyright>
// <summary>
//   Defines the QueryCondition type.
// </summary>
// --------------------------------------------------------------------------------------------------------------------

namespace DataFramework.QueryConditions
{
    /// <summary>
    /// A query condition that is modeled when the framework generates a query.
    /// </summary>
    public class QueryCondition : BaseQueryCondition
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="QueryCondition"/> class.
        /// </summary>
        /// <param name="propertyName">Name of the property.</param>
        /// <param name="value">The value.</param>
        /// <param name="type">The type.</param>
        public QueryCondition(string propertyName, object value, ConditionType type = ConditionType.Unknown)
        {
            this.PropertyName = propertyName;
            this.PropertyValue = value;
            Type = type;
        }

        /// <summary>
        /// Gets the name of the property.
        /// </summary>
        /// <value>The name of the property.</value>
        public string PropertyName { get; private set; }

        /// <summary>
        /// Gets the property value.
        /// </summary>
        /// <value>The property value.</value>
        public object PropertyValue { get; private set; }
    }
}
